/*
package Day01;

public class Student {
    private String name;

    private int number;

    private Course course;

    public Student(String name, int number, Course course) {
        this.name = name;
        this.number = number;
        this.course = course;
    }

    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }

    public void selection(Course course){
        this.course = course;
        System.out.println("姓名为" +this.getName() + "的学生选了"
            + this.getCourse().getName()+ "课程 , 授课的老师是" + this.getCourse().getTeacher());
    }

    public void cancel(){
        System.out.println("姓名为" +this.getName() + "的学生退选了" + this.getCourse().getName());
        this.course  = null;
    }

    public void display(){
        System.out.println("学号为"+ this.getNumber() + " , 姓名为" + this.getName() + "的学生");
        if(this.course == null){
            System.out.println("还未选课");
        }else{
            System.out.println("学生已经选了" +this.getCourse().getName() +
                    "授课的老师是" +this.getCourse().getTeacher());
        }
    }


}
*/
